package com.heima.apis.wemedia;

import com.heima.model.admin.dto.NewsAuthDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;


import com.heima.model.wemedia.dtos.SensitiveDto;
import com.heima.model.wemedia.pojos.WmSensitive;
import com.heima.model.wemedia.pojos.WmNews;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient("leadnews-wemedia")
public interface ManualCheckClient {

    @PostMapping("/api/v1/news/list_vo")
    public PageResponseResult getNewsListByUncheck(@RequestBody NewsAuthDto dto);

    @PostMapping("/api/v1/news/auth_fail")
    public ResponseResult authFail(@RequestBody NewsAuthDto dto);


    /**
     * 查询文章详情
     *
     * @param id 文章id
     * @return 返回该id对应的文章详情
     */
    @GetMapping("/api/v1/news/one_vo/{id}")
    public ResponseResult adminById(@PathVariable Integer id);

    /**
     * 审核通过
     *
     * @param
     * @return
     */
    @PostMapping("/api/v1/news/auth_pass")

    public ResponseResult authPass(@RequestBody NewsAuthDto dto );


    /**
     * 根据id删除
     *
     * @param id
     * @return
     */
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    public ResponseResult delete(@PathVariable Integer id) ;
    /**
     * 新增铭感词
     * @param wmSensitive
     * @return
     */
    @PostMapping("/api/v1/sensitive/save")
    public ResponseResult save(@RequestBody WmSensitive wmSensitive) ;

    /**
     * 根据id修改
     * @param wmSensitive
     * @return
     */
    @PostMapping("/api/v1/sensitive/update")
    public ResponseResult update(@RequestBody WmSensitive wmSensitive);

    /**
     * 分页或者模糊查询
     * @param sensitiveDto
     * @return
     */
    @PostMapping("/api/v1/sensitive/list")
    public ResponseResult list(@RequestBody() SensitiveDto sensitiveDto);

    @PostMapping("/api/v1/news/auth_pass")
    public ResponseResult passTheAudit(@RequestBody WmNews wmNews);


}